Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(hog): add isNull/isNotNull to hog #26973

Merged
merged 5 commits into from
Dec 18, 2024
Merged

feat(hog): add isNull/isNotNull to hog #26973

merged 5 commits into from
Dec 18, 2024

Conversation

mariusandra
Copy link
Collaborator

Problem

Users had filter break because isNotNull is not available in Hog.

Note: depends on #26967 - I'll rebase once it's in master.

Changes

  • Add isNull and isNotNull.
  • Add python manage.py print_hog_stl_table that returns this:
Error                                       Hog
HogError                                    Hog
JSONArrayLength                       HogQL    
JSONExtract                           HogQL    
JSONExtractArrayRaw                   HogQL    
JSONExtractBool                       HogQL Hog
JSONExtractFloat                      HogQL    
JSONExtractInt                        HogQL    
JSONExtractKey                        HogQL    
JSONExtractKeys                       HogQL    
JSONExtractKeysAndValues              HogQL    
JSONExtractKeysAndValuesRaw           HogQL    
JSONExtractRaw                        HogQL    
JSONExtractString                     HogQL    
JSONExtractUInt                       HogQL    
JSONHas                               HogQL Hog
JSONLength                            HogQL Hog
JSONType                              HogQL    
JSON_VALUE                            HogQL    
L1Distance                            HogQL    
L1Norm                                HogQL    
L1Normalize                           HogQL    
L2Distance                            HogQL    
L2Norm                                HogQL    
L2Normalize                           HogQL    
LinfDistance                          HogQL    
LinfNorm                              HogQL    
LinfNormalize                         HogQL    
LpDistance                            HogQL    
LpNorm                                HogQL    
LpNormalize                           HogQL    
NotImplementedError                         Hog
RetryError                                  Hog
URLHierarchy                          HogQL    
URLPathHierarchy                      HogQL    
_toInt64                              HogQL    
_toUInt128                            HogQL    
_toUInt64                             HogQL    
abs                                   HogQL    
acos                                  HogQL    
acosh                                 HogQL    
addDays                               HogQL    
addHours                              HogQL    
addMinutes                            HogQL    
addMonths                             HogQL    
addQuarters                           HogQL    
addSeconds                            HogQL    
addWeeks                              HogQL    
addYears                              HogQL    
age                                   HogQL    
aggregate_funnel                      HogQL    
aggregate_funnel_array                HogQL    
aggregate_funnel_array_trends         HogQL    
aggregate_funnel_cohort               HogQL    
aggregate_funnel_cohort_trends        HogQL    
aggregate_funnel_test                 HogQL    
aggregate_funnel_trends               HogQL    
alphaTokens                           HogQL    
and                                   HogQL    
appendTrailingCharIfAbsent            HogQL    
array                                 HogQL    
arrayAUC                              HogQL    
arrayAll                              HogQL    
arrayAvg                              HogQL    
arrayCompact                          HogQL    
arrayConcat                           HogQL    
arrayCount                            HogQL Hog
arrayCumSum                           HogQL    
arrayCumSumNonNegative                HogQL    
arrayDifference                       HogQL    
arrayDistinct                         HogQL    
arrayElement                          HogQL    
arrayEnumerate                        HogQL    
arrayEnumerateDense                   HogQL    
arrayEnumerateUniq                    HogQL    
arrayExists                           HogQL Hog
arrayFill                             HogQL    
arrayFilter                           HogQL Hog
arrayFirst                            HogQL    
arrayFirstIndex                       HogQL    
arrayFlatten                          HogQL    
arrayFold                             HogQL    
arrayIntersect                        HogQL    
arrayJoin                             HogQL    
arrayLast                             HogQL    
arrayLastIndex                        HogQL    
arrayMap                              HogQL Hog
arrayMax                              HogQL    
arrayMin                              HogQL    
arrayPopBack                          HogQL Hog
arrayPopFront                         HogQL Hog
arrayProduct                          HogQL    
arrayPushBack                         HogQL Hog
arrayPushFront                        HogQL Hog
arrayResize                           HogQL    
arrayReverse                          HogQL Hog
arrayReverseFill                      HogQL    
arrayReverseSort                      HogQL Hog
arrayReverseSplit                     HogQL    
arrayRotateLeft                       HogQL    
arrayRotateRight                      HogQL    
arraySlice                            HogQL    
arraySort                             HogQL Hog
arraySplit                            HogQL    
arrayStringConcat                     HogQL Hog
arraySum                              HogQL    
arrayUniq                             HogQL    
arrayWithConstant                     HogQL    
arrayZip                              HogQL    
ascii                                 HogQL    
asin                                  HogQL    
asinh                                 HogQL    
assumeNotNull                         HogQL    
atan                                  HogQL    
atan2                                 HogQL    
atanh                                 HogQL    
bar                                   HogQL    
base58Decode                          HogQL    
base58Encode                          HogQL    
base64Decode                          HogQL Hog
base64Encode                          HogQL Hog
bitAnd                                HogQL    
bitCount                              HogQL    
bitHammingDistance                    HogQL    
bitNot                                HogQL    
bitOr                                 HogQL    
bitRotateLeft                         HogQL    
bitRotateRight                        HogQL    
bitShiftLeft                          HogQL    
bitShiftRight                         HogQL    
bitSlice                              HogQL    
bitTest                               HogQL    
bitTestAll                            HogQL    
bitTestAny                            HogQL    
bitXor                                HogQL    
bitmapAnd                             HogQL    
bitmapAndCardinality                  HogQL    
bitmapAndnot                          HogQL    
bitmapAndnotCardinality               HogQL    
bitmapBuild                           HogQL    
bitmapCardinality                     HogQL    
bitmapContains                        HogQL    
bitmapHasAll                          HogQL    
bitmapHasAny                          HogQL    
bitmapMax                             HogQL    
bitmapMin                             HogQL    
bitmapOr                              HogQL    
bitmapOrCardinality                   HogQL    
bitmapSubsetInRange                   HogQL    
bitmapSubsetLimit                     HogQL    
bitmapToArray                         HogQL    
bitmapTransform                       HogQL    
bitmapXor                             HogQL    
bitmapXorCardinality                  HogQL    
cbrt                                  HogQL    
ceil                                  HogQL    
cityHash64                            HogQL    
coalesce                              HogQL    
concat                                HogQL Hog
concatWithSeparator                   HogQL    
convertCharset                        HogQL    
cos                                   HogQL    
cosh                                  HogQL    
cosineDistance                        HogQL    
countEqual                            HogQL    
countMatches                          HogQL    
countSubstrings                       HogQL    
countSubstringsCaseInsensitive        HogQL    
countSubstringsCaseInsensitiveUTF8    HogQL    
cutFragment                           HogQL    
cutQueryString                        HogQL    
cutQueryStringAndFragment             HogQL    
cutToFirstSignificantSubdomain        HogQL    
cutToFirstSignificantSubdomainWithWWW HogQL    
cutURLParameter                       HogQL    
cutWWW                                HogQL    
dateAdd                               HogQL    
dateDiff                              HogQL    
dateName                              HogQL    
dateSub                               HogQL    
dateTrunc                             HogQL    
decodeURLComponent                    HogQL Hog
decodeURLFormComponent                HogQL    
decodeXMLComponent                    HogQL    
degrees                               HogQL    
dense_rank                            HogQL    
divide                                HogQL    
divideDecimal                         HogQL    
domain                                HogQL    
domainWithoutWWW                      HogQL    
dotProduct                            HogQL    
e                                     HogQL    
empty                                 HogQL Hog
encodeURLComponent                    HogQL Hog
encodeURLFormComponent                HogQL    
encodeXMLComponent                    HogQL    
endsWith                              HogQL    
equals                                HogQL    
erf                                   HogQL    
erfc                                  HogQL    
exp                                   HogQL    
exp10                                 HogQL    
exp2                                  HogQL    
extract                               HogQL    
extractAll                            HogQL    
extractAllGroups                      HogQL    
extractAllGroupsHorizontal            HogQL    
extractAllGroupsVertical              HogQL    
extractTextFromHTML                   HogQL    
extractURLParameter                   HogQL    
extractURLParameterNames              HogQL    
extractURLParameters                  HogQL    
factorial                             HogQL    
firstSignificantSubdomain             HogQL    
first_value                           HogQL    
floor                                 HogQL    
format                                HogQL    
formatDateTime                        HogQL Hog
formatReadableDecimalSize             HogQL    
formatReadableQuantity                HogQL    
formatReadableSize                    HogQL    
formatReadableTimeDelta               HogQL    
fragment                              HogQL    
fromModifiedJulianDay                 HogQL    
fromUnixTimestamp                     HogQL Hog
fromUnixTimestampMilli                      Hog
gcd                                   HogQL    
generateSeries                        HogQL    
generateUUIDv4                              Hog
geoDistance                           HogQL    
geohashDecode                         HogQL    
geohashEncode                         HogQL    
geohashesInBox                        HogQL    
greatCircleAngle                      HogQL    
greatCircleDistance                   HogQL    
greater                               HogQL    
greaterOrEquals                       HogQL    
greatest                              HogQL    
has                                   HogQL Hog
hasAll                                HogQL    
hasAny                                HogQL    
hasSubstr                             HogQL    
hex                                   HogQL    
hop                                   HogQL    
hopEnd                                HogQL    
hopStart                              HogQL    
hypot                                 HogQL    
if                                    HogQL    
ifNotFinite                           HogQL    
ifNull                                HogQL Hog
ilike                                 HogQL Hog
in                                    HogQL    
indexOf                               HogQL Hog
intDiv                                HogQL    
intDivOrZero                          HogQL    
intExp10                              HogQL    
intExp2                               HogQL    
isFinite                              HogQL    
isInfinite                            HogQL    
isNaN                                 HogQL    
isNotNull                             HogQL Hog
isNull                                HogQL Hog
isValidJSON                           HogQL Hog
isValidUTF8                           HogQL    
jsonParse                                   Hog
jsonStringify                               Hog
keys                                        Hog
lagInFrame                            HogQL    
last_value                            HogQL    
lcm                                   HogQL    
leadInFrame                           HogQL    
least                                 HogQL    
left                                  HogQL    
leftPad                               HogQL    
leftPadUTF8                           HogQL    
length                                HogQL Hog
lengthUTF8                            HogQL    
less                                  HogQL    
lessOrEquals                          HogQL    
lgamma                                HogQL    
like                                  HogQL Hog
ln                                    HogQL    
log                                   HogQL    
log10                                 HogQL    
log1p                                 HogQL    
log2                                  HogQL    
lower                                 HogQL Hog
lowerUTF8                             HogQL    
map                                   HogQL    
mapAdd                                HogQL    
mapApply                              HogQL    
mapContains                           HogQL    
mapContainsKeyLike                    HogQL    
mapExtractKeyLike                     HogQL    
mapFilter                             HogQL    
mapFromArrays                         HogQL    
mapKeys                               HogQL    
mapPopulateSeries                     HogQL    
mapSubtract                           HogQL    
mapUpdate                             HogQL    
mapValues                             HogQL    
match                                 HogQL Hog
max2                                  HogQL    
md5Hex                                      Hog
min2                                  HogQL    
minus                                 HogQL    
modulo                                HogQL    
moduloOrZero                          HogQL    
monthName                             HogQL    
multiFuzzyMatchAllIndices             HogQL    
multiFuzzyMatchAny                    HogQL    
multiFuzzyMatchAnyIndex               HogQL    
multiIf                               HogQL    
multiMatchAllIndices                  HogQL    
multiMatchAny                         HogQL    
multiMatchAnyIndex                    HogQL    
multiSearchAllPositions               HogQL    
multiSearchAllPositionsUTF8           HogQL    
multiSearchAny                        HogQL    
multiSearchFirstIndex                 HogQL    
multiSearchFirstPosition              HogQL    
multiply                              HogQL    
multiplyDecimal                       HogQL    
negate                                HogQL    
netloc                                HogQL    
ngramDistance                         HogQL    
ngramSearch                           HogQL    
ngrams                                HogQL    
not                                   HogQL    
notEmpty                              HogQL Hog
notEquals                             HogQL    
notILike                              HogQL Hog
notIn                                 HogQL    
notLike                               HogQL Hog
now                                   HogQL Hog
nowInBlock                            HogQL    
nth_value                             HogQL    
nullif                                HogQL    
or                                    HogQL    
parseDateTime                         HogQL    
parseDateTimeBestEffort               HogQL    
path                                  HogQL    
pathFull                              HogQL    
pi                                    HogQL    
plus                                  HogQL    
pointInEllipses                       HogQL    
pointInPolygon                        HogQL    
port                                  HogQL    
position                              HogQL Hog
positionCaseInsensitive               HogQL Hog
positionCaseInsensitiveUTF8           HogQL    
positionUTF8                          HogQL    
positiveModulo                        HogQL    
pow                                   HogQL    
power                                 HogQL    
print                                       Hog
protocol                              HogQL    
queryString                           HogQL    
queryStringAndFragment                HogQL    
radians                               HogQL    
range                                 HogQL    
rank                                  HogQL    
regexpExtract                         HogQL    
regexpQuoteMeta                       HogQL    
reinterpretAsFloat32                  HogQL    
reinterpretAsFloat64                  HogQL    
reinterpretAsInt128                   HogQL    
reinterpretAsInt16                    HogQL    
reinterpretAsInt256                   HogQL    
reinterpretAsInt32                    HogQL    
reinterpretAsInt64                    HogQL    
reinterpretAsInt8                     HogQL    
reinterpretAsUInt128                  HogQL    
reinterpretAsUInt16                   HogQL    
reinterpretAsUInt256                  HogQL    
reinterpretAsUInt32                   HogQL    
reinterpretAsUInt64                   HogQL    
reinterpretAsUInt8                    HogQL    
reinterpretAsUUID                     HogQL    
repeat                                HogQL    
replace                               HogQL    
replaceAll                            HogQL Hog
replaceOne                            HogQL Hog
replaceRegexpAll                      HogQL    
replaceRegexpOne                      HogQL    
reverse                               HogQL Hog
reverseUTF8                           HogQL    
right                                 HogQL    
rightPad                              HogQL    
rightPadUTF8                          HogQL    
round                                 HogQL    
roundAge                              HogQL    
roundBankers                          HogQL    
roundDown                             HogQL    
roundDuration                         HogQL    
roundToExp2                           HogQL    
rowNumberInAllBlocks                  HogQL    
rowNumberInBlock                      HogQL    
row_number                            HogQL    
run                                         Hog
sha256Hex                                   Hog
sha256HmacChainHex                          Hog
sign                                  HogQL    
sin                                   HogQL    
sinh                                  HogQL    
sleep                                       Hog
splitByChar                           HogQL    
splitByNonAlpha                       HogQL    
splitByRegexp                         HogQL    
splitByString                         HogQL Hog
splitByWhitespace                     HogQL    
sqrt                                  HogQL    
startsWith                            HogQL    
subBitmap                             HogQL    
substring                             HogQL    
substringUTF8                         HogQL    
subtractDays                          HogQL    
subtractHours                         HogQL    
subtractMinutes                       HogQL    
subtractMonths                        HogQL    
subtractQuarters                      HogQL    
subtractSeconds                       HogQL    
subtractWeeks                         HogQL    
subtractYears                         HogQL    
tan                                   HogQL    
tgamma                                HogQL    
timeSlot                              HogQL    
timeSlots                             HogQL    
timeStampAdd                          HogQL    
timeStampSub                          HogQL    
timeZoneOf                            HogQL    
timeZoneOffset                        HogQL    
toBool                                HogQL    
toDate                                HogQL Hog
toDateTime                            HogQL Hog
toDayOfMonth                          HogQL    
toDayOfWeek                           HogQL    
toDayOfYear                           HogQL    
toDecimal                             HogQL    
toFloat                               HogQL Hog
toHour                                HogQL    
toISOWeek                             HogQL    
toISOYear                             HogQL    
toInt                                 HogQL Hog
toIntervalDay                         HogQL    
toIntervalHour                        HogQL    
toIntervalMinute                      HogQL    
toIntervalMonth                       HogQL    
toIntervalQuarter                     HogQL    
toIntervalSecond                      HogQL    
toIntervalWeek                        HogQL    
toIntervalYear                        HogQL    
toJSONString                          HogQL    
toLastDayOfMonth                      HogQL    
toLastDayOfWeek                       HogQL    
toMinute                              HogQL    
toModifiedJulianDay                   HogQL    
toMonday                              HogQL    
toMonth                               HogQL    
toNullable                            HogQL    
toQuarter                             HogQL    
toSecond                              HogQL    
toStartOfDay                          HogQL    
toStartOfFifteenMinutes               HogQL    
toStartOfFiveMinutes                  HogQL    
toStartOfHour                         HogQL    
toStartOfISOYear                      HogQL    
toStartOfMinute                       HogQL    
toStartOfMonth                        HogQL    
toStartOfQuarter                      HogQL    
toStartOfSecond                       HogQL    
toStartOfTenMinutes                   HogQL    
toStartOfWeek                         HogQL    
toStartOfYear                         HogQL    
toString                              HogQL Hog
toTime                                HogQL    
toTimeZone                            HogQL Hog
toTypeName                            HogQL    
toUUID                                HogQL Hog
toUnixTimestamp                       HogQL Hog
toUnixTimestamp64Milli                HogQL    
toUnixTimestampMilli                        Hog
toValidUTF8                           HogQL    
toWeek                                HogQL    
toYYYYMM                              HogQL    
toYYYYMMDD                            HogQL    
toYYYYMMDDhhmmss                      HogQL    
toYear                                HogQL    
toYearWeek                            HogQL    
today                                 HogQL    
tokens                                HogQL    
topLevelDomain                        HogQL    
transform                             HogQL    
translate                             HogQL    
translateUTF8                         HogQL    
trim                                  HogQL Hog
trimLeft                              HogQL Hog
trimRight                             HogQL Hog
trunc                                 HogQL    
tryBase58Decode                       HogQL    
tryBase64Decode                       HogQL    
tumble                                HogQL    
tumbleEnd                             HogQL    
tumbleStart                           HogQL    
tuple                                 HogQL Hog
tupleDivide                           HogQL    
tupleDivideByNumber                   HogQL    
tupleElement                          HogQL    
tupleHammingDistance                  HogQL    
tupleMinus                            HogQL    
tupleMultiply                         HogQL    
tupleMultiplyByNumber                 HogQL    
tupleNegate                           HogQL    
tuplePlus                             HogQL    
tupleToNameValuePairs                 HogQL    
typeof                                      Hog
unhex                                 HogQL    
untuple                               HogQL    
upper                                 HogQL Hog
upperUTF8                             HogQL    
values                                      Hog
width_bucket                          HogQL    
xor                                   HogQL    
yesterday                             HogQL    

Still plenty to do 😅

How did you test this code?

Added a Hog test.

@mariusandra mariusandra changed the title add is-null to hog feat(hog): add isNull/isNotNull to hog Dec 17, 2024
@mariusandra mariusandra requested a review from a team December 17, 2024 15:22
Copy link
Contributor

Size Change: 0 B

Total Size: 1.11 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.11 MB

compressed-size-action

@mariusandra mariusandra enabled auto-merge (squash) December 18, 2024 08:08
@mariusandra mariusandra merged commit 6e7369c into master Dec 18, 2024
99 checks passed
@mariusandra mariusandra deleted the hog-is-null branch December 18, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants